package com.waste.game.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.waste.game.entity.entitiytv.VideoUpTimeBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Transactional(rollbackFor = RuntimeException.class)
public interface VideoHomeUpTimeListDao extends BaseMapper<VideoUpTimeBean> {
    //最近更新查询
//    @Select("SELECT tv_title,tv_img,tv_url,tv_type,tv_up_time,tv_tip FROM tvuptime ORDER BY time DESC LIMIT 7")
    List<VideoUpTimeBean> getTvUpTime(@Param("day")Integer day,@Param("start")Integer start,@Param("end")Integer end);
    //后台查询更新
    List<VideoUpTimeBean> getUpList();
    //查询某一个
    VideoUpTimeBean getUpOne(@Param("id")Integer id);
    //修改一个最近更新
    int setUpTime(@Param("a")VideoUpTimeBean videoUpTimeBean);
    //添加一个最近更新
    int setUpTimeInset(@Param("a")VideoUpTimeBean videoUpTimeBean);
}
